﻿using System;
using System.ComponentModel;
using System.Linq;
using ProjectEuler.Linq;

namespace ProjectEuler.Problems
{
    [EulerProblem(10, 142913828922L)]
    [Description("Calculate the sum of all the primes below two million.")]
    internal sealed class Problem010 : EulerProblem
    {
        public override Object Solve()
        {
            return new SieveOfEratosthenes(1999999).Sum(n => (Int64)(n));
        }
    }
}